	device zxspectrum128
	org #8000
	xor a
	out (#fe),a
	ld hl,mdata
	ld d,#0e
	ld e,a
	jr p2
	
l1
        ei
        ld b,#10
1       halt
        djnz 1b
        
portout
	exx
	ld d,2
	ld e,4
p2	
	ld bc,#7ffd
pg	ld a,29	
 	xor (#17 xor 29)
 	ld (pg+1),a
 	out (c),a
	
2	ld a,(hl)
	cp #ff
	jr nz,1f
	ld l,low notes
	jr 2b
1	
	ld b,#ff
	out (c),e
	ld b,#bf
	outi
	inc e
	dec d
	jr nz,2b
	exx
	ld hl,#c000
	ld b,l
1	ld (hl),b
	inc hl
	ld a,h
	cp #d8
	jr c,1b
	ld b,5+#40
	cp #db
	jr nz,1b
	ld a,r
	ld (mp3+1),a
	ld de,#d7e1
	ld hy,#1f
        call mp
        ld e,#8d
        ld hy,#f
        call mp
        ld e,#75
	ld hy,#7
        call mp
        ld e,#00
        ld l,e
        ld b,#1e
        ld c,d
        call m11
        jr l1
			

mdata
	db #c5,#07,#e2,#03,#98,#02,#01,#38,#10,#10,#09,#7c,#00,#08
notes
        db #72,#02
        db #f1,#01
        db #98,#02
        db #ff

mp
mp3	ld hl,#3000
	ld b,#0d
	ld c,1
2
	push de,bc	
r2	ld lx,b		
	call inim
7
	add a,(hl)
	inc l
	jr nc,6f
	rrc c
	jr nc,6f
	inc e
6
	call up_de
	call setter
	djnz 7b
	ld b,lx
	dec b
	jr z,3f
r1	
4	
	ld lx,b
	call inim
	call m11
	ld b,lx
	dec b
	jr z,3f
	exx
	ld de,r1
	push de
	exx
	jr 2b
3
	ld b,#0c
1	
	pop de
	djnz 1b
	pop bc
	pop de
	ret
m11	  
6
	add a,(hl)
	inc l
	call c,up_de
	rrc c
	jr nc,7f
	inc e
7		
	call setter
	djnz 6b
inim
	ld a,(hl)
	and hy
	inc a
	ld b,a
;	ret
setter
	exa
	ld a,(de)
	or c
	ld (de),a
	ld a,e
	add a,b
	ld e,a
	ld a,(de)
	or c
	ld (de),a
	ld a,e
	sub b
	ld e,a
	exa
	ret	

up_de
	exa
        dec d
        ld a,d
        and 7
        cp 7
        jr nz,3f
        ld a,e
        sub #20
        ld e,a
        jr c,3f
        ld a,d
        add a,8
        ld d,a
3	exa        
        ret
        display $-#8000
	savesna "d:\k\spekka\!code\crackspeak\crack1.sna",#8000
        labelslist "e:\program files\unreal speccy\user.l"
        emptytrd "d:\k\spekka\!code\crackspeak\raww07.trd"
        savetrd "d:\k\spekka\!code\crackspeak\raww07.trd","shiver.C",#8000,#100